import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/user/list',
    method: 'get',
    params: query
  })
}

export function getList(query) {
  return request({
    url: '/user/lists',
    method: 'get',
    params: query
  })
}

export function createUser(data) {
  return request({
    url: '/user/create',
    method: 'post',
    data
  })
}

export function createNewUser(data) {
  return request({
    url: '/user/creates',
    method: 'post',
    data
  })
}

export function readUser(query) {
  return request({
    url: '/user/detail',
    method: 'get',
    params: query
  })
}

export function payFive(data) {
  return request({
    url: '/user/payfive',
    method: 'post',
    data
  })
}

export function updateUser(data) {
  return request({
    url: '/user/update',
    method: 'post',
    data
  })
}
export function checkUserName(query) {
  return request({
    url: '/user/checkusername',
    method: 'get',
    params: query
  })
}
export function checkChargeStatus(query) {
  return request({
    url: '/user/checkchargestatus',
    method: 'get',
    params: query
  })
}
export function orderTotallist(query) {
  return request({
    url: '/user/down',
    method: 'get',
    params: query
  })
}
export function chargeByAliPay(data) {
  return request({
    url: '/user/chargebyalipay',
    method: 'post',
    data
  })
}
export function checkAliPayStatus(query) {
  return request({
    url: '/user/checkalipaystatus',
    method: 'get',
    params: query
  })
}

export function queryalipaystatus(query) {
  return request({
    url: '/user/queryalipaystatus',
    method: 'get',
    params: query
  })
}
